import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    component: () => import('@/views/echarts/index'),
  },
  {
    path: '/echarts',
    component: () => import('@/views/echarts/index'),
    children: [
      {
        path: '3dPie',
        name: '3dPie',
        component: () => import('@/views/echarts/threeDPie')
      },
      {
        path: 'echart2',
        name: 'echart2',
        component: () => import('@/views/echarts/echart2')
      },
      {
        path: 'customX',
        name: 'customX',
        component: () => import('@/views/echarts/customX')
      },
      {
        path: 'bars',
        name: 'bars',
        component: () => import('@/views/echarts/bars')
      },
      {
        path: 'pieAndBar',
        name: 'pieAndBar',
        component: () => import('@/views/echarts/pieAndBar')
      },
      {
        path: 'barAndImg',
        name: 'barAndImg',
        component: () => import('@/views/echarts/barAndImg')
      },
      {
        path: 'sangjitu',
        name: 'sangjitu',
        component: () => import('@/views/echarts/sangjitu')
      }
    ]
  },
  {
    path: '/exportExcel',
    component: () => import('@/views/exportExcel/index1'),
    children: [
      {
        path: 'exportExcel1',
        name: 'exportExcel1',
        component: () => import('@/views/exportExcel/index1.vue')
      },
      {
        path: 'exportExcel2',
        name: 'exportExcel2',
        component: () => import('@/views/exportExcel/index2.vue')
      }
    ]
  },
  {
    path: '/highCharts',
    component: () => import('@/views/highCharts/index'),
    children: [
      {
        path: 'highCharts',
        name: 'highCharts',
        component: () => import('@/views/highCharts/highCharts')
      }
    ]
  },
  {
    path: '/luckysheet',
    component: () => import('@/views/luckysheet/index'),
    // children: [
    //   {
    //     path: 'highCharts',
    //     name: 'highCharts',
    //     component: () => import('@/views/luckysheet/index')
    //   }
    // ]
  },
  {
    path: '/api',
    component: () => import('@/views/api/index'),
    children: [
      {
        path: 'userlogin',
        name: 'userlogin',
        component: () => import('@/views/api/userlogin')
      },
      {
        path: 'qqcos',
        name: 'qqcos',
        component: () => import('@/views/api/qqcos')
      },
      {
        path: 'qqlogin',
        name: 'qqlogin',
        component: () => import('@/views/api/qqlogin')
      },
      {
        path: 'aiartText',
        name: 'aiartText',
        component: () => import('@/views/api/aiartText')
      }
    ]
  },
  {
    path: '/excel',
    component: () => import('@/views/excel/index'),
    children: [
      {
        path: 'exportExcel',
        name: 'exportExcel',
        component: () => import('@/views/excel/exportExcel')
      }
    ]
  },
  {
    path: '/meditor',
    component: () => import('@/views/meditor/index'),
    children: [
      {
        path: 'meditorTest',
        name: 'meditorTest',
        component: () => import('@/views/meditor/meditor')
      }
    ]
  },
  {
    path: '/axios',
    component: () => import('@/views/axios/index'),
    children: [
      {
        path: 'axiosPage',
        name: 'axiosPage',
        component: () => import('@/views/axios/axiosPage')
      }
    ]
  },
  {
    path: '/test',
    component: () => import('@/views/test/index'),
    children: [
      {
        path: 'loginCode',
        name: 'loginCode',
        component: () => import('@/views/test/loginCode')
      },
      {
        path: 'tableToMark',
        name: 'tableToMark',
        component: () => import('@/views/test/TableToMarkDown')
      }
    ]
  }
]
const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})
export default router
